package net.adetech.crj.service;

import net.adetech.crj.utils.InnerServiceUtil;
import net.adetech.framework.entity.ServiceRequest;
import net.adetech.framework.entity.ServiceResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service("cjg.call")
public class CJGCallService implements BaseService {

    @Autowired
    InnerServiceUtil innerServiceUtil;

    @Override
    public Map<String, Object> invoke(Map<String, Object> params) {
        ServiceRequest serviceRequest = new ServiceRequest();
        serviceRequest.setServiceName("cjg.service");
        serviceRequest.setParams(params);
        ServiceResponse response = innerServiceUtil.call(serviceRequest);
        return response.getResults();
    }
}
